function data (date) {
  var now = new Date(date*1000);
  var year = now.getFullYear();
  var month = (now.getMonth() + 1) < 10 ? '0' + (now.getMonth() + 1) : (now.getMonth() + 1);
  var date = now.getDate();
  var  hour=now.getHours();     
  var  minute=now.getMinutes();     
  var  second=now.getSeconds();     
  return  month+"-"+date+"   "+hour+":"+minute;
} 
function year (date) {
  var now = new Date(date*1000);
  var year = now.getFullYear();
  var month = (now.getMonth() + 1) < 10 ? '0' + (now.getMonth() + 1) : (now.getMonth() + 1);
  var date = now.getDate();
  var  hour=now.getHours();     
  var  minute=now.getMinutes();     
  var  second=now.getSeconds();     
  return   year+"-"+month+"-"+date;
} 
function strs(str,index){
  return str.substring(0,index)
}
module.exports = {data,year,strs};